<?php
class XSTokenizerNyyc implements XSTokenizer
{
	//分词数组
	public $arg = array('asddd','bbb','csds','dee','里声','测试','人参','武汉','买光');
	
	public function getTokens($value, XSDocument $doc = null){		
		$data = $this->tokenxs($value);
		
		return $data;
	}
	
	public function tokenxs($data){
		
		$arg = $this->arg;
		$tokens = array();
		
		foreach($arg as $pv){
			if(strpos($data,$pv) or strpos($data,$pv) === 0){
				$tokens[] = $pv;
			}
		}
		
		return $tokens;
	}
}
